package io.renren.service.impl;

import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;


import io.renren.dao.ShopcartDao;
import io.renren.entity.ShopcartEntity;
import io.renren.service.ShopcartService;

import java.util.List;


@Service("shopcartService")
public class ShopcartServiceImpl extends ServiceImpl<ShopcartDao, ShopcartEntity> implements ShopcartService {

    @Override
    public ShopcartEntity getProductInShopCart(Integer userid,Integer productid){
        ShopcartEntity shopcartEntity = baseMapper.getProductInShopCart(userid,productid);
        return shopcartEntity;
    }


    @Override
    public List<ShopcartEntity> getShopCartInfoByUserId(Integer userid){
        List<ShopcartEntity> list = baseMapper.getShopCartInfoByUserId(userid);
        return list;
    }

}
